import QtQuick 1.1
import com.nokia.meego 1.0

ListView {
    id: itemListView
    //anchors.fill: parent
//    anchors.topMargin: 10
//    anchors.bottomMargin: 10
//    anchors.leftMargin: 10
//    anchors.rightMargin: 10
    clip: true
    spacing: 5

    //section.property: "type"
    section.criteria: ViewSection.FullString
    section.delegate: Component {
        id: sectionHeading
        Rectangle {
            x: 5
            width: parent.width - 10
            height: childrenRect.height
            color: theme.inverted ? "#000000" : "#ffffff"
            Rectangle {
                width: parent.width - sectionLabel.implicitWidth - 10;
                height: 2
                anchors.left: parent.left
                anchors.top: parent.top
                anchors.topMargin: sectionLabel.height / 2
                color: theme.inverted ? "#969696" : "#a3a3a3"
            }
            Label {
                id: sectionLabel
                anchors.topMargin: 2
                anchors.bottomMargin: 2
                text: section
                font.bold: true
                font.pointSize: 16
                color: theme.inverted ? "#969696" : "#a3a3a3"
                width: parent.width
                horizontalAlignment: Text.AlignRight
            }
        }
    }
}
